[Unit]
Description=YARN service
After=network.target
Wants=yarn-resourcemanager.service

[Service]
Environment=JAVA_HOME={{ java_home }}
Environment=HADOOP_CONF_DIR={{ hadoop_home }}/etc/hadoop
Type=forking
User=vagrant
ExecStart={{ hadoop_home }}/bin/yarn --config $HADOOP_CONF_DIR --daemon start nodemanager
ExecStop={{ hadoop_home }}/bin/yarn --config $HADOOP_CONF_DIR --daemon stop nodemanager
Restart=on-failure

[Install]
WantedBy=multi-user.target
